package org.nepu.scr.indexrate.ratecompliance;

import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.nepu.scr.indexrate.ratecompliance.compliance.params.ComplianceData;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@AllArgsConstructor
public class ComplianceDataService {
    @SneakyThrows
    public void setData (ComplianceData data, String result, String target){
        switch (target) {
            case "A": data.setA(result);break;
            case "A1": data.setA1(result);break;
            case "A2": data.setA2(result);break;
            case "A3": data.setA3(result);break;
            case "A4": data.setA4(result);break;
            case "A5": data.setA5(result);break;
            case "A11": data.setA11(result);break;
            case "A12": data.setA12(result);break;
            case "A21": data.setA21(result);break;
            case "A22": data.setA22(result);break;
            case "A23": data.setA23(result);break;
            case "A31": data.setA31(result);break;
            case "A32": data.setA32(result);break;
            case "A41": data.setA41(result);break;
            case "A42": data.setA42(result);break;
            case "A43": data.setA43(result);break;
            case "A44": data.setA44(result);break;
            case "A45": data.setA45(result);break;
            case "A51": data.setA51(result);break;
            case "A52": data.setA52(result);break;
            case "A53": data.setA53(result);break;
            case "A54": data.setA54(result);break;
            case "A55": data.setA55(result);break;
            case "A56": data.setA56(result);break;
            case "A111": data.setA111(result);break;
            case "A112": data.setA112(result);break;
            case "A113": data.setA113(result);break;
            case "A114": data.setA114(result);break;
            case "A115": data.setA115(result);break;
            case "A116": data.setA116(result);break;
            case "A411": data.setA411(result);break;
            case "A412": data.setA412(result);break;
            case "A413": data.setA413(result);break;
            case "A421": data.setA421(result);break;
            case "A422": data.setA422(result);break;
            case "A441": data.setA441(result);break;
            case "A442": data.setA442(result);break;
            case "A443": data.setA443(result);break;
            case "A451": data.setA451(result);break;
            case "A452": data.setA452(result);break;
            default: break;
        }
    }
}
